/********************************************************************************
 * Copyright (c)2016-2020, ShenZhen WanJiaAn Technology CO.,LTD.
 * All Rights Reserved.
 *
 * File Name     : McuSoc.h
 * Author        : joki.zhu
 * Date          : 2020-07-03
 *
 * Record        :
 * 1.Date        : 2020-07-03
 *   Author      : joki.zhu
 *   Modification: Created file
 ********************************************************************************/

#ifndef __MCUSOC_H__
#define __MCUSOC_H__

#include "DevSocSub.h"

#ifdef __cplusplus
#if __cplusplus
extern "C"{
#endif
#endif /* __cplusplus */


int mcusoc_set_led_state(unsigned char value);

int mcusoc_get_pir_switch();
int mcusoc_set_pir_switch(char bEnable);
int mcusoc_get_pir_sensitivity(int *pValue);
int mcusoc_set_pir_sensitivity(int value);
int mcusoc_set_pir_delay_wakeup_time(PIR_DELAY_WAKEUP_ATTR_S stPirDelayAttr);
int mcusoc_get_pir_delay_wakeup_time(PIR_DELAY_WAKEUP_ATTR_S *pstPirDelayAttr);

int mcusoc_get_wakeup_type(SYSTEM_WAKEUP_TYPE_E *pWakeUpType);
int mcusoc_get_battery_status(BATTERY_STATUS_S *pstBatStatus);

int mcusoc_get_battery_status(BATTERY_STATUS_S *pstBatStatus);

int mcusoc_get_time(SYSTEM_TIME *pstSysTime);
int mcusoc_set_time(SYSTEM_TIME stSysTime);

int mcusoc_set_reset(char *reason);

int mcusoc_set_wifi_power_on(void);
int mcusoc_set_wifi_power_off(void);
int mcusoc_set_wifi_power_switch(unsigned char switchState);
int mcusoc_set_wifi_state(char state);
int mcusoc_get_wifi_state(char *pState);

int mcusoc_set_mainsoc_power_off(void);
int mcusoc_set_mainsoc_keep_power(void);

int mcusoc_set_wdg_state(char bEnable);
int mcusoc_get_wdg_state(char *pState);
int mcusoc_set_wdg_period(AV_U32 time);
int mcusoc_set_wdg_feed(void);

int mcusoc_set_sys_config(SOCSUB_SYS_CONFIG_S stMcuSysConfig);
int mcusoc_get_sys_config(SOCSUB_SYS_CONFIG_S *pstMcuSysConfig);

int mcusoc_set_alarm_wakeup(SOCSUB_ALARM_WAKEUP_ATTR_S stAlarmWakeupAttr);
int mcusoc_get_alarm_wakeup(SOCSUB_ALARM_WAKEUP_ATTR_S *pstAlarmWakeupAttr);

int mcusoc_check_is_support_update(void);
int mcusoc_get_version(char *pVersion);
int mcusoc_set_mainsoc_start_detect_time(int timeSec);
int mcusoc_set_wakeup_event_clear(void);
int mcusoc_get_temperature(float *pTempValue);

int mcusoc_init(void);
int mcusoc_deinit(void);


#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* __cplusplus */


#endif /* __MCUSOC_H__ */
